<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <input type="text">
  +
  <input type="text">
  <button>=</button>
  <span></span>
  <script>
    let inputs = document.querySelectorAll('input');
    let button = document.querySelector('button');
    let span = document.querySelector('span');

    button.onclick = function(){
      let result = Number(inputs[0].value) + Number(inputs[1].value);
      span.innerHTML = result;
    }
  </script>
</body>
</html>